<?php

return array(
	"prepare" => '
$m = mysql_connect($conf["mysql"]["server"], $conf["mysql"]["user"], $conf["mysql"]["password"]);
mysql_query("USE ".$conf["mysql"]["database"]);
mysql_query("DROP TABLE IF EXISTS  `bencher_mysql`");
mysql_query("CREATE TABLE `bencher_mysql` (
`id` INT NOT NULL ,
`parent_id` INT NOT NULL DEFAULT \'0\',
`name` VARCHAR( 128 ) NOT NULL DEFAULT \'qwerasdfzxcvtyuighjkbnm\'
) ENGINE = MYISAM ")',
	"after" => 'mysql_query("DROP TABLE IF EXISTS  `bencher_mysql`");',
	"tests" => array(
		"insert" => array(
			"desc" => "MySQL simple insert",
			"code" => '
$res = mysql_query("INSERT INTO `t` (`parent_id`, `name`) VALUE (\'".mysql_real_escape_string(intval($i/10), $m)."\', \'".mysql_real_escape_string("qweertyasdghc45 67uig 3", $m))",$m);'
		)
		"select" => array(
			"desc" => "MySQL simple select",
			"code" => '
$res = mysql_query("SELECT * FROM `t` WHERE 1".$i, $mysql);
if(!$res) die(mysql_error($mysql));
while($row = mysql_fetch_assoc($res)) {}
',
			"i" => 100
		)
	)
);
?>
